﻿@model IEnumerable<scheduleMVC.Models.CustomerModel>

@{
    ViewBag.Title = "Costumer List";
}

<h2>@ViewBag.Title</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table class="table">
    <tr>
        
     
        <th>
            @Html.DisplayNameFor(model => model.Business_Name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.First_Name)
        </th>

        <th>
            @Html.DisplayNameFor(model => model.Last_Name)
        </th>
        
        <th>
            @Html.DisplayNameFor(model => model.Phone_Number)
        </th>

        <th>
            @Html.DisplayNameFor(model => model.Email)
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>

        <td>
            @Html.DisplayFor(modelItem => item.Business_Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.First_Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Last_Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Phone_Number)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Email)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.CustomerId }) |
            @Html.ActionLink("Details", "Details", new { id=item.CustomerId }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.CustomerId })
        </td>
    </tr>
}

</table>
